package org.gd.hellojavacore.isd;

import java.io.IOException;

/**
 6. Consider the following code:

 StringBuffer sbuf = new StringBuffer();
 sbuf = null;
 System.gc();

 Choose all true statements:
 1. After line 2 executes, the StringBuffer object is garbage collected.
 2. After line 3 executes, the StringBuffer object is garbage collected.
 3. After line 2 executes, the StringBuffer object is eligible for garbage collection.
 4. After line 3 executes, the StringBuffer object is eligible for garbage collection.
 5. None of the above

 */
public class Test6 {

    public static void main(String...args) throws IOException {
        StringBuffer sbuf = new StringBuffer();
        sbuf = null;
        System.gc();
        System.out.println(sbuf);
    }
}
